package com.ddlaw.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ddlaw.dao.KnowledgeDao;
import com.ddlaw.entity.TLawKnowledge;
import com.ddlaw.entity.TLawKnowledgeDetail;
import com.ddlaw.entity.TLawKnowledgeType;
import com.ddlaw.service.KnowledgeService;
@Service
@Transactional
public class KnowledgeServiceImpl implements KnowledgeService{

	@Resource
	KnowledgeDao knowledgeDao;

	@Override
	public List<TLawKnowledgeDetail> getAllKnowledge() {
		// TODO Auto-generated method stub
		return knowledgeDao.getAllKnowledge();
	}

	@Override
	public int addKnowledge(TLawKnowledgeDetail knowledge) {
		// TODO Auto-generated method stub
		return knowledgeDao.addKnowledge(knowledge);
	}

	@Override
	public int delKnowledgeById(int knowledgeId) {
		// TODO Auto-generated method stub
		return knowledgeDao.delKnowledgeById(knowledgeId);
	}

	@Override
	public List<TLawKnowledge> getAllType() {
		// TODO Auto-generated method stub
		return knowledgeDao.getAllType();
	}

	@Override
	public List<TLawKnowledgeDetail> getById(int typeId) {
		// TODO Auto-generated method stub
		return knowledgeDao.getById(typeId);
	}

	@Override
	public List<TLawKnowledgeType> getType(int typeId) {
		// TODO Auto-generated method stub
		return knowledgeDao.getType(typeId);
	}

}
